let http = require('http');

let server = http.createServer((req, res) => {

res.setHeader("Content-Type","text/html;charset=UTF-8");

if(req.url=='/favicon.ico'){
    return;
}
if(req.url=='/' || req.url=='/index/index'){
    res.end('<h1>首页<h1>')
}else if(req.url=='/index/login'){
    res.end('登录页面')
}else if(req.url=='/index/reg'){
    res.end('注册页面')
}else if(req.url=='/user/product'){
    res.end('产品列表')
}else if(req.url=='/user/order'){
    res.end('订单列表')
}else{
    res.end('404 无法显示')
}

})
server.listen(80);